﻿using System;
using System.Collections.Generic;
using System.Linq;

// ReSharper disable InconsistentNaming
namespace Machinery.Extensions
{

    public static class IListExtensions
    {

        public static void RemoveWhere<T>(this IList<T> list, Func<T, bool> matches) 
        {
            var toRemove = list.Where(matches).FirstOrDefault();
            list.Remove(toRemove);
        }
    }
}
// ReSharper restore InconsistentNaming
